

using System;
using Unity.Mathematics;
using UnityEngine;
public class CesiumGltfPrimitiveComponent : MonoBehaviour
{
    internal int[] overlayTextureCoordinateIDToUVIndex;
    public string tile_url;
    public double4x4 HighPrecisionNodeTransform { get; internal set; }

    internal void UpdateTransformFromCesium(double4x4 cesiumToUnrealTransform)
    {
        var trans = math.mul(cesiumToUnrealTransform, HighPrecisionNodeTransform);
        trans.Decompose(out float3 position, out float4 rotation, out float3 scale);
        this.transform.localPosition = position;
        this.transform.localRotation = new Quaternion(rotation.x, rotation.y, rotation.z, rotation.w);
        this.transform.localScale = (Vector3)scale;
    }
}